<?php

namespace app\controllers;

use Yii;
use yii\web\Controller;
use yii\helpers\Url;

class TestController extends Controller
{
	function actionUrl(){
		echo 	"<h1>首页</h1>".
				Url::to(['site/index']).
				"<h1>二级列表</h1>".
				Url::to(['article/index','page'=>1,'catSlug'=>'php']).
				"<br>".
				Url::to(['article/index','page'=>2,'catSlug'=>'php']).
				"<h1>一级列表</h1>".
				Url::to(['article/index','page'=>1,'catSlug'=>null]).
				"<br>".
				Url::to(['article/index','page'=>2,'catSlug'=>null]).
				"<h1>内页</h1>".
				Url::to(['article/content','slug'=>'hahaha','catSlug'=>'php']).
				"<br>".
				"<h1>单页</h1>"
				.Url::to(['site/login']);
	}
}